//
//  BA_BusinessHelper.h
//  BaseProject
//
//  Created by 王洋 on 2020/12/29.
//  Copyright © 2020 王洋. All rights reserved.
//  套餐、商家通用业务的辅助类
//  预约、展示广播啥的

#import <Foundation/Foundation.h>

#import "StoreDetailSubscribeView.h"
#import "StoreDetailNoticeView.h"
#import "IMAlertView.h"
#import "WeddingCountDownView.h"
#import "HomeADView.h"

NS_ASSUME_NONNULL_BEGIN

//足迹类型1商家2套餐3作品4婚品
typedef NS_ENUM(NSInteger, BusinessCollectType) {
    //
    BusinessCollectType_unKnow,
    //店铺
    BusinessCollectType_store    =1,
    //套餐
    BusinessCollectType_package  =2,
    //作品
    BusinessCollectType_case     =3,
    //婚品
    BusinessCollectType_goods    =4,
    //场地
    BusinessCollectType_field    =5,
};

typedef NS_ENUM(NSInteger, BusinessActionType) {
    //统筹师
    BusinessActionType_tcs
};

typedef NS_ENUM(NSInteger, MarryCountPlaceType) {
    //用于设置婚期后，展示于首页
    MarryCountPlaceType_home,
    //设置了，直接修改用于设置页面
    MarryCountPlaceType_mine,
    //直接添加，用于没设置的时候
    MarryCountPlaceType_setting,
};

@interface BA_BusinessHelper : NSObject

@property (nonatomic, copy) NSString *sellerId;

//非婚品分佣比例
@property (nonatomic, readonly) NSInteger userProportion;
//扣除的税点
@property (nonatomic, readonly) NSInteger taxPoint;


//浏览过的店铺汇总
@property (nonatomic, strong) NSMutableArray *browseSellerIds;

@property (nonatomic, copy) void(^BusinessHelperDismissBlock)(BOOL success);

@property (nonatomic, assign) MarryCountPlaceType countDownPlaceType;



+ (BA_BusinessHelper *)shared;

//第一次安装的时候，获取一个推送
- (void)firstInstallPush;

- (void)syncBusinessData;

//弹出婚礼倒计时
- (void)callMarryCountDownViewWithType:(MarryCountPlaceType)type;

//弹出新用户view
- (void)callNewUserViewComption:(void (^)(HomeADViewActionType type))comption;


//弹出预约
- (void)callSubscribeStoreWith:(NSString *)sellerId;

//弹出公告
- (void)callNoticeWith:(NSString *)title And:(NSString *)content;

//弹出im弹框
- (void)callIMViewWith:(BusinessActionType)type;

//弹出网页
- (void)callSimpleWebWith:(NSString *)url htmlStr:(NSString *)htmlStr;



//店铺收藏
- (void)callCollectStoreWith:(NSString *)baseId currentStatus:(BOOL)isCollect type:(BusinessCollectType)type comption:(void (^)(BOOL success))comption;


- (void)callgetCouponWith:(NSString *)baseId And:(NSString *)sellerId comption:(void (^)(BOOL success))comption;

//足迹以及访问时间
- (void)addFootPrintWith:(NSString *)baseId lastTime:(NSTimeInterval)lastTime And:(NSString *)sellerId type:(BusinessCollectType)type;


//店铺间浏览操作
- (void)clearBrowseData;

- (void)browseStore:(NSString *)sellerId type:(BusinessActionType)type comption:(void (^)(BOOL success))comption;

- (void)request_updateInfoWithSellerId:(NSString *)sellerId phoneNo:(NSString *)phoneNo andWechatId:(NSString *)wechatId comption:(void (^)(BOOL success))comption;

@end

NS_ASSUME_NONNULL_END
